package com.analysis.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 百度千帆AppBuilder配置类
 * 基于百度千帆AppBuilder API文档
 */
@Configuration
@ConfigurationProperties(prefix = "baidu.chat")
public class BaiduAgentConfig {
    
    /**
     * API基础URL
     */
    private String baseUrl = "https://qianfan.baidubce.com/v2/app";
    
    /**
     * API密钥
     */
    private String apiKey;
    
    /**
     * 默认应用ID
     */
    private String defaultAppId;
    
    /**
     * 连接超时时间（毫秒）
     */
    private Integer connectTimeout = 30000;
    
    /**
     * 读取超时时间（毫秒）
     */
    private Integer readTimeout = 300000;
    
    /**
     * 是否启用日志记录
     */
    private Boolean enableLogging = true;
    
    /**
     * 最大重试次数
     */
    private Integer maxRetries = 3;
    
    /**
     * 重试间隔（毫秒）
     */
    private Integer retryInterval = 1000;
    
    // 构造函数
    public BaiduAgentConfig() {}
    
    // Getters and Setters
    public String getBaseUrl() {
        return baseUrl;
    }
    
    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }
    
    public String getApiKey() {
        return apiKey;
    }
    
    public void setApiKey(String apiKey) {
        this.apiKey = apiKey;
    }
    
    public String getDefaultAppId() {
        return defaultAppId;
    }
    
    public void setDefaultAppId(String defaultAppId) {
        this.defaultAppId = defaultAppId;
    }
    
    public Integer getConnectTimeout() {
        return connectTimeout;
    }
    
    public void setConnectTimeout(Integer connectTimeout) {
        this.connectTimeout = connectTimeout;
    }
    
    public Integer getReadTimeout() {
        return readTimeout;
    }
    
    public void setReadTimeout(Integer readTimeout) {
        this.readTimeout = readTimeout;
    }
    
    public Boolean getEnableLogging() {
        return enableLogging;
    }
    
    public void setEnableLogging(Boolean enableLogging) {
        this.enableLogging = enableLogging;
    }
    
    public Integer getMaxRetries() {
        return maxRetries;
    }
    
    public void setMaxRetries(Integer maxRetries) {
        this.maxRetries = maxRetries;
    }
    
    public Integer getRetryInterval() {
        return retryInterval;
    }
    
    public void setRetryInterval(Integer retryInterval) {
        this.retryInterval = retryInterval;
    }
}
